﻿using Dapper;
using System;
using BCEntity.Common.Service.WebsiteServiceItem;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.Service.WebsiteServiceItem
{
    /// <summary>
    /// 官网服务项目
    /// </summary>
    public interface IWebsiteServiceItemData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="websiteServiceItemId">官网服务项目Id</param>
        Task<bool> Exists(int websiteServiceItemId);
        /// <summary>
        /// 增加官网服务项目
        /// </summary>
        /// <param name="entity">官网服务项目信息</param>
        Task<WebsiteServiceItemEntity> Add(WebsiteServiceItemEntity entity);
        /// <summary>
        /// 更新官网服务项目
        /// </summary>
        /// <param name="entity">官网服务项目信息</param>
        Task<WebsiteServiceItemEntity> Update(WebsiteServiceItemEntity entity);
        /// <summary>
        /// 删除官网服务项目
        /// </summary>
        /// <param name="websiteServiceItemId">官网服务项目Id</param>
        Task<bool> Delete(int websiteServiceItemId);
        /// <summary>
        /// 获取官网服务项目
        /// </summary>
        /// <param name="websiteServiceItemId">官网服务项目Id</param>
        Task<WebsiteServiceItemEntity> GetEntity(int websiteServiceItemId);
        /// <summary>
        /// 获取官网服务项目列表
        /// </summary>
        /// <param name="websiteServiceTypeId">服务类型Id</param>
        Task<IEnumerable<WebsiteServiceItemEntity>> GetList(int? websiteServiceTypeId);
        /// <summary>
        /// 获取官网服务项目分页列表
        /// </summary>
        /// <param name="businessCategoryTitle">业务分类标题</param>
        /// <param name="serviceTypeName">服务类型名称</param>
        /// <param name="serviceItemName">服务项目名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<WebsiteServiceItemEntity>, int)> Query(string businessCategoryTitle, string serviceTypeName, string serviceItemName, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        /// <summary>
		/// 启用官网服务项目
		/// </summary>
		/// <param name="websiteServiceItemId">官网服务项目Id</param>
		Task<bool> Enabled(int websiteServiceItemId);
        /// <summary>
        /// 禁用官网服务项目
        /// </summary>
        /// <param name="websiteServiceItemId">官网服务项目Id</param>
        Task<bool> Disabled(int websiteServiceItemId);
        #endregion  成员方法
    }


}